#ifndef REPLACE_H
#define REPLACE_H

#include <QDialog>
class QTextEdit;
namespace Ui {
class Replace;
}

class Replace : public QDialog
{

    Q_OBJECT
public slots:
    void find();
    void findPre();
    void findNext();
    void replace();
    void replaceAll();
public:
    void closeEvent(QCloseEvent *) override{
        erase();
    }
    void erase();
    explicit Replace(QWidget *parent = nullptr,QTextEdit* _target = nullptr);
    ~Replace();

private:
    QString curr;
    Ui::Replace *ui;
    QTextEdit* target;
};

#endif // REPLACE_H
